package org.wak.scene
{
	import org.wak.baseoneonline.flash.geom.IntPoint;

	public class XMLGateSpotDefinition implements IGateSpotDefinition
	{
		// position IntPoint 
		private var mPosition:IntPoint = null ;
		
		// Size of the area width and height. 
		private var mSize:IntPoint = null ;
		
		// destination Scene id.
		private var mDestinationSceneId:String = "" ; 
		
		// destination name to show.
		private var mDestinationName:String = "" ; 
		
		// Animation behaviour id after the jump.
		private var mBehaviourAnimId:String = "" ;
		
		// enabled flag of the gatespot
		private var mEnabled:Boolean = true;
		
		private var mGatespotId:String = "" ;
		private var mVisible:Boolean = true ;
		
		public function XMLGateSpotDefinition(pInputXML:XML)
		{
			mPosition = new IntPoint(pInputXML.Position.@x, pInputXML.Position.@y);
			mSize = new IntPoint(pInputXML.Size.@w, pInputXML.Size.@h);
			mDestinationSceneId = pInputXML.Destination ;
			mBehaviourAnimId = pInputXML.Behaviour ;
			mEnabled = pInputXML.@enabled == "true" ? true : false ;
			mDestinationName = pInputXML.Name ;
			mGatespotId = pInputXML.@id ;
			
			mVisible = pInputXML.@visible == "true" ? true : false ;
		}
		
		public function get visible():Boolean 
		{
			return mVisible;
		}
		
		public function get gatespotId():String 
		{
			return mGatespotId ;
		}

		public function get position():IntPoint
		{
			return mPosition;
		}
		
		public function get size():IntPoint
		{
			return mSize;
		}
		
		public function get sceneDestinationId():String
		{
			return mDestinationSceneId;
		}
		
		public function get charBehaviour():String
		{
			return mBehaviourAnimId ;
		}
		
		public function get destinationName():String
		{
			return mDestinationName ;
		} 
		
		public function get enabled():Boolean
		{
			return mEnabled ;
		}
		
	}
}